package cn.yjh.server.support;

import java.io.Serializable;
import java.net.URL;
import java.nio.ByteBuffer;
import java.util.HashMap;
import java.util.Map;


public final class Response implements Serializable {

    protected ByteBuffer outBuffer;

    public Response(ByteBuffer outBuffer) {
        this.outBuffer = outBuffer;
    }

    protected HttpStatus status;

    protected String msg;

    protected Object Data;

    protected URL resourceURL;

    protected Map<String,String> header = new HashMap<>();

    public HttpStatus getStatus() {
        return status;
    }

    public void setStatus(HttpStatus status) {
        this.status = status;
    }

    public String getMsg() {
        return msg;
    }

    public void setMsg(String msg) {
        this.msg = msg;
    }

    public Object getData() {
        return Data;
    }

    public void setData(Object data) {
        Data = data;
    }

    public ByteBuffer getOutBuffer() {
        return outBuffer;
    }

    public URL getResourceURL() {
        return resourceURL;
    }

    public Map<String, String> getHeader() {
        return header;
    }

    public void setHeader(Map<String, String> header) {
        this.header = header;
    }

    public void setResourceURL(URL resourceURL) {
        this.resourceURL = resourceURL;
    }
}
